🤖 feat: optional flat chat list for the sidebar with project badges - #3994
Conversation
reorderPinned scoped the re-deal to the first id's project bucket, so a flat-mode drag spanning projects hit the <2 pinned early-return (or only rewrote one bucket) and the optimistic client order reverted on reload. Scope the reorder to the union of buckets referenced by the input ids: grouped drags keep single-bucket behavior, flat drags re-deal the whole unified block's timestamp pool.
- render the project badge on draft rows (prop was threaded but unused) - gate flat-list derivation behind the flag so grouped mode skips the global sort/flatten work - simplify buildSortedWorkspacesFlat to take rows directly (the two-pass config merge reproduced Array.from(map.values()) before a global sort) - dedupe project badge resolution; inline single-use GroupedSidebarSection - drop leftover divide-y padding on the API Debug Logs row - document flat mode in locatePinnedBlock's JSDoc
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cee23bc30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- setPinned scans all project buckets for the global pinnedAt max so new pins append at the bottom of the flat unified pinned block - flat collection respects the multi-project experiment gate - project badge props are stable primitives; badge text uses text-secondary for contrast, keeping the project color as a tinted background/border - workspace and draft aria-labels include the project badge name - Storybook shared reset clears SIDEBAR_FLAT_MODE_KEY - flat draft deletion selects an adjacent draft; draft promotion renders the promoted workspace once in the draft's position - extracted one shared coalesced list pipeline so flat mode gets task-group coalescing (best-of + workflow runs) identical to grouped mode
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2866aec8b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- reorderPinned substitutes requested ids into their existing slots so a partial input (grouped multi-project section spanning buckets) never displaces omitted pins in the flat global order (red-green tested) - flat mode renders compact project management headers below the chat list: per-project new chat, options menu, rename, and color stay reachable via mouse/touch without leaving flat mode - FlatChatList story pins a phone viewport variant plus a play contract that the flat list and headers are actually on screen
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccb84d8369
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…eriment The flat block in locatePinnedBlock included pins the sidebar hides while the multi-project experiment is off, so keyboard/palette moves could swap with an invisible row and appear to do nothing. The block now mirrors the sidebar's render gate (red-green tested); omitted hidden pins keep their slots server-side via the round-2 slot-preservation fix.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2155a9c31
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Flat mode renders each project's sub-projects as compact SectionHeader rows under its management header: scoped new chat, rename, color, and delete stay reachable via mouse/touch. SectionHeader's expand toggle is now optional and renders a static folder icon when omitted, since nothing nests under the flat rows (red-green tested).
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0dc30381f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Chats and drafts scoped to a valid sub-project now badge with the sub-project's display name and color (stale references fall back to the parent project), since flat mode drops the section headers that used to convey that scope. Red-green tested.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9977e7243b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 188deb9821
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d603e969b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tory reset, carry drag section identity
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c220bde067
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ba6d29e65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce39dd80e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f104268ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This comment has been minimized.
This comment has been minimized.
- workspaceService flat-reorder mock (#3994) sets getSessionDir on Partial<Config>, which the split Config (#4017) no longer has; the test only needs sessionsDir - ProjectSidebar flat-list mocks (#3994) lack archivingWorkspaceIds (#4068) - MCP prompt snapshot test asserts the cancelSignal argument this PR removed
## Summary Settings > General groups its controls under headings (Appearance, Sidebar, Transcript, Terminal, Archiving, Editor & debugging, Projects), but only whitespace separated the groups, so the boundary between one group's last row and the next heading was hard to see. This adds a thin horizontal rule between the groups. ## Implementation Each group wrapper after the first gets `border-border-light border-t pt-6`: a 1px rule in the theme border color (the same token `divide-border-light` uses elsewhere in Settings), with the existing `space-y-6` gap above the line and `pt-6` below it so the heading is not glued to the rule. No rule above Appearance. Six className edits in `GeneralSection.tsx`, no new components or CSS. ## Validation - Storybook `GeneralSection` story at 1100px and 390px: computed styles show `0px` border on the Appearance wrapper and `1px rgb(38,38,38)` + `24px` padding-top on the other six; no horizontal overflow. - Remote dogfood UAT (Coder Agents) on this exact commit: six dividers with even spacing in dark and light themes at desktop and 390px, placement holds when the Terminal group grows/shrinks (Terminal Badge on/off), other tabs unchanged. - UAT also surfaced a pre-existing issue, not touched here: at 390px the Terminal Font input (fixed `w-80`) overflows the settings column; reproduced on the base commit. > Note: the first CI run inherited two failures from a then-red `main` (coder#3994's stale `getSessionDir` mock and five `ProjectSidebar flat chat list` renders missing `archivingWorkspaceIds`); coder#4077 fixed both on `main`, which is merged in here. --- _Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking: `xhigh` • Cost: `$19.46`_ <!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=xhigh costs=19.46 -->
## Summary Version bump for the v0.28.5 patch release. Headline changes since v0.28.4: remote server connections in the desktop app (coder#4101), self-updating `xum server` under a restart supervisor (coder#4083, coder#4127), first-class GPT-6 Astra and Astra Pro support including Codex OAuth routing (coder#4064, coder#4094, coder#4106, coder#4124), token-budget context window rollovers (coder#4097), the workspace remembering model and mode on send (coder#3968), in-place plugin updates (coder#4164), the optional flat sidebar chat list (coder#3994), and copying selected chat text as Markdown (coder#4170). It also carries a long run of streaming, compaction, and task-lifecycle fixes (reconnect streaming coder#4123, message edits during active streams coder#4153, Codex OAuth prompt-cache routing coder#4159, compaction/history fencing coder#4133 through coder#4148, task lock ordering coder#4161) plus the Effect Wave 4 runtime refactors and deslop passes 1 through 3. ## Implementation Bumped with `node ./scripts/set-package-version.js 0.28.5` so the root `package.json` and the legacy `packages/mux-compat` forwarding package stay version-locked. `src/common/compat/productIdentity.test.ts` passes locally (8/8). After this PR merges, the `v0.28.5` tag will be applied to the squash commit and the GitHub Release published to trigger the desktop/npm/docker pipelines. --- _Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking: `xhigh` • Cost: `$1.64`_ <!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=xhigh costs=1.64 -->
Summary
Adds an optional flat sidebar mode: a new "Flat chat list" setting replaces the project-folder grouping with one globally sorted list of chats, keeping pinned chats in a single unified block at the top and tagging each root chat card with a project-name badge tinted by the project's folder color. The General settings page is also reorganized from three monolithic headers into logical groups (Appearance, Sidebar, Transcript, Terminal, Archiving, Editor & debugging, Projects).
Background
Users working across many projects lose vertical space and orientation to per-project folders when they mostly care about "all my recent chats". The flat mode drops the folders while badges preserve project attribution; grouped mode stays the default and is unchanged.
Implementation
sidebarFlatModepersists viausePersistedState(key insrc/common/constants/storage.ts, default off) with a command palette toggle for parity with the sibling sidebar options.buildSortedWorkspacesFlat(workspaceFiltering.ts) reuses the existing comparators: pinned roots first in globalpinnedAtorder, then recency with deterministic tie-breakers, then the tree flatten that keeps sub-agents under their parents. Age grouping and hide-sub-agents both compose with flat mode.workspaceService.reorderPinnednow scopes its timestamp re-deal to the union of project buckets referenced by the input ids (grouped drags keep exact single-bucket behavior), fixing cross-project reorders reverting on reload.resolveSectionColorof the project's configured color); scratch chats get no badge, multi-project chats a neutral one, sub-agent rows none.Validation
reorderPinnedcross-bucket test fails without the service change.Risks
reorderPinnedis the only backend touch; scope generalization is covered by new unit tests plus the pre-existing single-bucket suite (defensive contract unchanged).Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh